Package-level declarations

Types

Link copied to clipboard
open class ClickRecognizer(target: EventTarget, callback: (GestureRecognizer) -> Unit? = null) : GestureRecognizer

A concrete gesture recognizer subclass that looks for single or multiple mouse clicks.

Link copied to clipboard
open class DragRecognizer(target: EventTarget, callback: (GestureRecognizer) -> Unit? = null) : GestureRecognizer

A concrete gesture recognizer subclass that looks for mouse drag gestures.

Link copied to clipboard
class FlingAnimator(scheduler: FrameScheduler, applyPanDelta: (deltaPxX: Double, deltaPxY: Double) -> Unit, onActiveChange: (active: Boolean) -> Unit = {})

Drives a per-frame action with monotonically decaying velocity until the velocity drops below a threshold. The platform supplies a FrameScheduler that fires a tick on each render frame (Choreographer / requestAnimationFrame / Swing Timer); each tick computes its own elapsed time so the animation stays correct even when the scheduler's interval drifts.

Link copied to clipboard
interface FrameScheduler

Per-platform vsync-aligned (or close-enough) frame scheduler. Implementations are expected to fire start's callback repeatedly until stop is called, with dtMs being the elapsed milliseconds since the previous tick (or since start for the first tick). The dtMs should be capped to a reasonable upper bound (e.g. 64 ms) so a missed frame can't teleport the camera.

GestureListener
Link copied to clipboard
interface GestureListener
interface GestureListener
interface GestureListener
GestureRecognizer
Link copied to clipboard
abstract class GestureRecognizer
abstract class GestureRecognizer

Port of the Android recognizer with MotionEvent swapped for our TouchEvent. The state-machine / centroid / translation logic is unchanged.

abstract class GestureRecognizer(val target: EventTarget, callback: (GestureRecognizer) -> Unit?)

Gesture recognizers translate user input event streams into higher level actions. A gesture recognizer is associated with an event target, which dispatches mouse and keyboard events to the gesture recognizer. When a gesture recognizer has received enough information from the event stream to interpret the action, it calls its callback functions. Callback functions may be specified at construction or added to the gestureCallbacks list after construction.

Link copied to clipboard

Gesture state indicates a GestureRecognizer's current state. Accepted values are POSSIBLE, FAILED, RECOGNIZED, BEGAN, CHANGED, CANCELLED, and ENDED.

Link copied to clipboard
PanRecognizer
Link copied to clipboard

Gesture recognizer implementation that detects touch panning gestures.

open class PanRecognizer(target: EventTarget, callback: (GestureRecognizer) -> Unit? = null) : GestureRecognizer

A concrete gesture recognizer subclass that looks for touch panning gestures.

PinchRecognizer
Link copied to clipboard

Gesture recognizer implementation that detects for two finger pinch gestures.

open class PinchRecognizer(target: EventTarget, callback: (GestureRecognizer) -> Unit? = null) : GestureRecognizer

A concrete gesture recognizer subclass that looks for two finger pinch gestures.

Link copied to clipboard
class PivotAnchorState(engine: WorldWind, lookAt: LookAt)

Keeps a captured geographic anchor fixed under its original screen pixel while lookAt's range and/or heading change. Per-frame apply solves for lookAt.position via

Link copied to clipboard
class ReleaseVelocitySampler(capacity: Int = 5, windowMs: Double = 100.0)

Samples a drag's instantaneous velocity into a small ring buffer and, on release, computes the average velocity over the last windowMs of motion. Better than EMA for fling: users tend to decelerate slightly just before lifting, and the EMA smears that deceleration into the reported release velocity. Averaging over a short trailing window captures the actual flick speed.

RotationRecognizer
Link copied to clipboard
open class RotationRecognizer(target: EventTarget, callback: (GestureRecognizer) -> Unit? = null) : GestureRecognizer

A concrete gesture recognizer subclass that looks for two finger rotation gestures.

Link copied to clipboard

User-input callbacks dispatched by SelectDragDetector for taps, drags and context gestures on the globe.

SelectDragDetector
Link copied to clipboard

iOS port of the JVM/Android SelectDragDetector. Mirrors the JVM pattern: pick is driven synchronously on DOWN (via WorldWindow.pick which drains the pick frame inline), so by the time we return to the dispatcher we already know whether a draggable renderable is under the finger. Subsequent MOVE events drive the drag directly when armed; otherwise they fall through to earth.worldwind.BasicWorldWindowController for camera panning.

Link copied to clipboard
open class TapRecognizer(target: EventTarget, callback: (GestureRecognizer) -> Unit? = null) : GestureRecognizer

A concrete gesture recognizer subclass that looks for single or multiple taps.

Link copied to clipboard
open class TiltRecognizer(target: EventTarget, callback: (GestureRecognizer) -> Unit? = null) : PanRecognizer

A concrete gesture recognizer subclass that looks for two finger tilt gestures.

Link copied to clipboard

iOS analog of Android's MotionEvent — normalized snapshot of one touch phase.

Link copied to clipboard
open class TouchWrapper(var identifier: Int, var clientX: Int, var clientY: Int)

Represents a touch point.